package com.project.frba.bifront.client.view;

import com.google.gwt.user.client.ui.Composite;
import com.gwtext.client.widgets.Window;
import com.gwtext.client.widgets.form.Label;
import com.gwtext.client.widgets.layout.FitLayout;

public class MessageWindow extends Composite {
	
	private Window mainWindow = new Window();
	
	public MessageWindow(String message){
		load(message);
	}
	
	public void load(String message){
		mainWindow.setLayout(new FitLayout());
		mainWindow.setTitle("Informacion");
		mainWindow.setWidth(400  + 20);
		mainWindow.setHeight(70);
		mainWindow.setResizable(false);

		Label lblMessage = new Label();
		lblMessage.setHtml("<div style=\"width: 100%; font-size: 14px;\" align=\"center\" >" + message + "</div>");

		mainWindow.add(lblMessage);
		initWidget(mainWindow);
		mainWindow.show();
	}
	
	public MessageWindow(String message, Boolean modal){
		mainWindow.setModal(modal);
		load(message);
	}
}
